package com.vcc.service.client.vo.notice;

import com.vcc.data.entity.Notice;
import com.vcc.service.client.vo.baseVo.BaseVo;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;
import java.util.Date;

@EqualsAndHashCode(callSuper = true)
@Data
@Setter
@Getter
public class NoticeVo extends BaseVo implements Serializable {

    private String title;

    private String content;

    private Boolean status;

    private Date startDate;

    private Date endDate;

    private Integer type;

    private Boolean hasPopup;


    public NoticeVo(){}

    public NoticeVo(Notice notice){
        super.setId(notice.getId());
        this.title = notice.getTitle();
        this.content = notice.getContent();
        this.status = notice.getStatus();
        super.setCreateDate(notice.getCreateDate());
        super.setUpdateDate(notice.getUpdateDate());
        this.startDate = notice.getStartDate();
        this.endDate = notice.getEndDate();
        this.type = notice.getType();
        this.hasPopup = notice.getHasPopup();
    }
}
